<?php
//Простейшие операции с cookie
class Cookie {
    static public function set($var, $value) {
        setcookie($var, $value, time()+31104000, '/');
    }
    
    static public function get($var) {
        if (isset($_COOKIE[$var]))
          return $_COOKIE[$var];
        return NULL;
    }
    
    static public function delete($var) {
        setcookie($var, '', time()-60, '/');
    }
}

?>